<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    ul{
      padding:0;
      margin:0;
      width:100%;
      border:1px solid #333;
      list-style: none;
      display: flex;
      flex-wrap: wrap;
      justify-content: space-around;
    }
    li{
      width: 30%;
      background-color: pink;
      text-align: center;
    }
  </style>
</head>
<body>
  <div id="app">
    <ul>
      <li v-for="film in films" :key="film.filmId">
        <h3>{{ film.name }}</h3>
        <img :src="film.poster" alt="">
      </li>
    </ul>
  </div>
  <script src="./vue.js"></script>
  <script src="./axios.js"></script>
  <script>
    const vm = new Vue({
      el: '#app',
      data: {
        films: []
      },
      created() {
        this.fetchData()
      },
      methods:{
        fetchData(){
          axios({
            url:'https://m.maizuo.com/gateway',
            method:'get',
            params:{
              cityId:110100,
              pageNum:1,
              pageSize:50,
              type:1,
              k:5700246
            },
            headers:{
              "X-Client-Info":'{"a":"3000","ch":"1002","v":"5.0.4","e":"160256909153244709568514","bc":"110100"}',
              "X-Host":'mall.film-ticket.film.list'
            }
          }).then(res=>{
            console.log(res)
            if(res.data.status === 0){
              this.films = res.data.data.films
            }
          })
        }
      }
    })
  </script>
</body>
</html>